{extend name="public:layout" /}
{block name="title"}添加专题{/block}
{block name="head"}{/block}
{block name="body"}
<div class="wrapper wrapper-content">
    <div class="ibox">
        <div class="ibox-title">
            <ol class="breadcrumb">
                <li>
                    <i class="fa fa-hand-o-right"></i>
                    <a href="{:url('index')}">专题管理</a>
                </li>
                <li class="active">添加专题</li>
            </ol>
        </div>
        <div class="ibox-content">
            <form method="post" class="form-horizontal" id="form">
                <div class="form-group">
                    <label class="col-sm-2 control-label">专题名称</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder="请输入专题名称"
                               name="special_title" datatype="*"
                               nullmsg="请输入专题名称！" errormsg=""/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">专题缩略图</label>

                    <div class="col-sm-4">
                        {:widget('common/Form/singleImg',['special_thumb','',$uid])}
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">专题封面图片</label>

                    <div class="col-sm-4">
                        {:widget('common/Form/singleImg',['special_image','',$uid])}
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">关键字</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control"
                               name="special_keyword" value="" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">描述</label>
                    <div class="col-sm-10">
                        <textarea class="form-control" name="special_description" rows="3"></textarea>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">专题模板</label>
                    <div class="col-sm-10">
                        {:widget('common/Form/code',['special_content'])}
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">专题状态</label>
                    <div class="col-sm-10">
                        <label class="radio-inline i-checks">
                            <input type="radio" checked name="special_status" value="0"> 草稿
                        </label>
                        <label class="radio-inline i-checks">
                            <input type="radio" name="special_status" value="1" checked> 发布
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-10 col-sm-offset-2">
                        <button class="btn btn-primary" type="button" id="btnSub">
                            保存内容
                        </button>
                        <a href="{:url('index')}" class="btn btn-white">取消</a>
                        <span id="validError"></span>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
{/block}
{block name="script"}
<script type="text/javascript">
    $(function () {
        iCheck();
        ajaxSubForm('#btnSub');
    })
</script>
{/block}